Controlling a device cloud

ABSTRACT

In one embodiment, a method includes receiving a command message from a client device associated with a user; parsing the command message; identifying, based on the parsed command message, one or more of a number of connected devices; determining, based on the parsed command message, one or more instructions for the identified connected devices; and providing the instructions to the identified connected devices.

PRIORITY

This application claims the benefit, under 35 U.S.C. § 119(e), of U.S.Provisional Patent Application No. 62/201,496, filed 5 Aug. 2015, whichis incorporated herein by reference.

TECHNICAL FIELD

This disclosure generally relates to a managing connected devices.

BACKGROUND

A social-networking system, which may include a social-networkingwebsite, may enable its users (such as persons or organizations) tointeract with it and with each other through it. The social-networkingsystem may, with input from a user, create and store in thesocial-networking system a user profile associated with the user. Theuser profile may include demographic information, communication-channelinformation, and information on personal interests of the user. Thesocial-networking system may also, with input from a user, create andstore a record of relationships of the user with other users of thesocial-networking system, as well as provide services (e.g., wall posts,photo-sharing, event organization, messaging, games, or advertisements)to facilitate social interaction between or among users.

The social-networking system may send over one or more networks contentor messages related to its services to a mobile or other computingdevice of a user. A user may also install software applications on amobile or other computing device of the user for accessing a userprofile of the user and other data within the social-networking system.The social-networking system may generate a personalized set of contentobjects to display to a user, such as a newsfeed of aggregated storiesof other users connected to the user.

A mobile computing device—such as a smartphone, tablet computer, orlaptop computer—may include functionality for determining its location,direction, or orientation, such as a GPS receiver, compass, gyroscope,or accelerometer. Such a device may also include functionality forwireless communication, such as BLUETOOTH (BT) communication, near-fieldcommunication (NFC), or infrared (IR) communication or communicationwith wireless local area networks (WLANs) or cellular-telephone network.Such a device may also include one or more cameras, scanners,touchscreens, microphones, or speakers. Mobile computing devices mayalso execute software applications, such as games, web browsers, orsocial-networking applications. With social-networking applications,users may connect, communicate, and share information with other usersin their social networks.

SUMMARY OF PARTICULAR EMBODIMENTS

Particular embodiments allow for a user communicate via messenger tocontrol, manage, or activate a user's smart devices. In furtherembodiments, a human-like-intelligence may be implemented withinmessenger such that a user is able to use natural language whilecontrolling, managing, or activating a user's smart devices. Inparticular embodiments, upon a user asking that a particular light beturned on, messenger may not need to be told which precise light needsto be turned on, but may be able to infer which light to turn on basedon surrounding factors. For example, upon messenger notifying a userthat the kitchen light has been turned on due to activity, the user maysimply respond “Turn off the light” without indicating it is the kitchenlight the user wished to turn off. The messenger may know to turn offthe kitchen light in response to receiving the user's message.

In particular embodiments, a user may have the ability to query,program, and manage connected devices through input of a messagingapplication. As an example and not by way of limitation, the messaginginfrastructure may have the ability to understand a natural-languagecommand message within the context of connected devices. In particularembodiments, a backend system may parse text of the natural-languagecommand message. The backend system may determine a context fromprevious device interactions.

In particular embodiments, a user may gain temporary access to connecteddevices through a messaging application. As an example and not by way oflimitation, the user may grant access to a connected device by sending anatural-language message identifying the other user and the connecteddevice. In particular embodiments, a backend system may determine anaffinity score between the two users satisfies a pre-determinedthreshold, in which case the other user may be allowed temporary accessto the connected device.

The embodiments disclosed below are only examples, and the scope of thisdisclosure is not limited to them. Particular embodiments may includeall, some, or none of the components, elements, features, functions,operations, or steps of the embodiments disclosed above. Embodimentsaccording to the invention are in particular disclosed in the attachedclaims directed to a method, a storage medium, a system and a computerprogram product, wherein any feature mentioned in one claim category,e.g., method, can be claimed in another claim category, e.g., system, aswell. The dependencies or references back in the attached claims arechosen for formal reasons only. However any subject matter resultingfrom a deliberate reference back to any previous claims (in particularmultiple dependencies) can be claimed as well, so that any combinationof claims and the features thereof are disclosed and can be claimedregardless of the dependencies chosen in the attached claims. Thesubject-matter which can be claimed comprises not only the combinationsof features as set out in the attached claims but also any othercombination of features in the claims, wherein each feature mentioned inthe claims can be combined with any other feature or combination ofother features in the claims. Furthermore, any of the embodiments andfeatures described or depicted herein can be claimed in a separate claimand/or in any combination with any embodiment or feature described ordepicted herein or with any of the features of the attached claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment associated with asocial-networking system.

FIG. 2 illustrates an example social graph.

FIG. 3 illustrates an example architecture for managing a device cloud.

FIG. 4 illustrates an example device graph.

FIG. 5 illustrates an example method for controlling connected devices.

FIG. 6 illustrates an example method for providing access to connecteddevices.

FIG. 7 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

FIG. 1 illustrates an example network environment 100 associated with asocial-networking system. Network environment 100 includes a clientsystem 130, a social-networking system 160, and a third-party system 170connected to each other by a network 110. Although FIG. 1 illustrates aparticular arrangement of client system 130, social-networking system160, third-party system 170, and network 110, this disclosurecontemplates any suitable arrangement of client system 130,social-networking system 160, third-party system 170, and network 110.As an example and not by way of limitation, two or more of client system130, social-networking system 160, and third-party system 170 may beconnected to each other directly, bypassing network 110. As anotherexample, two or more of client system 130, social-networking system 160,and third-party system 170 may be physically or logically co-locatedwith each other in whole or in part. Moreover, although FIG. 1illustrates a particular number of client systems 130, social-networkingsystems 160, third-party systems 170, and networks 110, this disclosurecontemplates any suitable number of client systems 130,social-networking systems 160, third-party systems 170, and networks110. As an example and not by way of limitation, network environment 100may include multiple client system 130, social-networking systems 160,third-party systems 170, and networks 110.

This disclosure contemplates any suitable network 110. As an example andnot by way of limitation, one or more portions of network 110 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 110 may include one or more networks110.

Links 150 may connect client system 130, social-networking system 160,and third-party system 170 to communication network 110 or to eachother. This disclosure contemplates any suitable links 150. Inparticular embodiments, one or more links 150 include one or morewireline (such as for example Digital Subscriber Line (DSL) or Data OverCable Service Interface Specification (DOC SIS)), wireless (such as forexample Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)), or optical (such as for example Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) links. In particularembodiments, one or more links 150 each include an ad hoc network, anintranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, aportion of the Internet, a portion of the PSTN, a cellulartechnology-based network, a satellite communications technology-basednetwork, another link 150, or a combination of two or more such links150. Links 150 need not necessarily be the same throughout networkenvironment 100. One or more first links 150 may differ in one or morerespects from one or more second links 150.

In particular embodiments, client system 130 may be an electronic deviceincluding hardware, software, or embedded logic components or acombination of two or more such components and capable of carrying outthe appropriate functionalities implemented or supported by clientsystem 130. As an example and not by way of limitation, a client system130 may include a computer system such as a desktop computer, notebookor laptop computer, netbook, a tablet computer, e-book reader, GPSdevice, camera, personal digital assistant (PDA), handheld electronicdevice, cellular telephone, smartphone, augmented/virtual realitydevice, other suitable electronic device, or any suitable combinationthereof. This disclosure contemplates any suitable client systems 130. Aclient system 130 may enable a network user at client system 130 toaccess network 110. A client system 130 may enable its user tocommunicate with other users at other client systems 130.

In particular embodiments, client system 130 may include a web browser132, such as MICROSOFT INTERNET EXPLORER, GOOGLE CHROME or MOZILLAFIREFOX, and may have one or more add-ons, plug-ins, or otherextensions, such as TOOLBAR or YAHOO TOOLBAR. A user at client system130 may enter a Uniform Resource Locator (URL) or other addressdirecting the web browser 132 to a particular server (such as server162, or a server associated with a third-party system 170), and the webbrowser 132 may generate a Hyper Text Transfer Protocol (HTTP) requestand communicate the HTTP request to server. The server may accept theHTTP request and communicate to client system 130 one or more Hyper TextMarkup Language (HTML) files responsive to the HTTP request. Clientsystem 130 may render a webpage based on the HTML files from the serverfor presentation to the user. This disclosure contemplates any suitablewebpage files. As an example and not by way of limitation, webpages mayrender from HTML files, Extensible Hyper Text Markup Language (XHTML)files, or Extensible Markup Language (XML) files, according toparticular needs. Such pages may also execute scripts such as, forexample and without limitation, those written in JAVASCRIPT, JAVA,MICROSOFT SILVERLIGHT, combinations of markup language and scripts suchas AJAX (Asynchronous JAVASCRIPT and XML), and the like. Herein,reference to a webpage encompasses one or more corresponding webpagefiles (which a browser may use to render the webpage) and vice versa,where appropriate.

In particular embodiments, social-networking system 160 may be anetwork-addressable computing system that can host an online socialnetwork. Social-networking system 160 may generate, store, receive, andsend social-networking data, such as, for example, user-profile data,concept-profile data, social-graph information, or other suitable datarelated to the online social network. Social-networking system 160 maybe accessed by the other components of network environment 100 eitherdirectly or via network 110. As an example and not by way of limitation,client system 130 may access social-networking system 160 using a webbrowser 132, or a native application associated with social-networkingsystem 160 (e.g., a mobile social-networking application, a messagingapplication, another suitable application, or any combination thereof)either directly or via network 110. In particular embodiments,social-networking system 160 may include one or more servers 162. Eachserver 162 may be a unitary server or a distributed server spanningmultiple computers or multiple datacenters. Servers 162 may be ofvarious types, such as, for example and without limitation, web server,news server, mail server, message server, advertising server, fileserver, application server, exchange server, database server, proxyserver, another server suitable for performing functions or processesdescribed herein, or any combination thereof. In particular embodiments,each server 162 may include hardware, software, or embedded logiccomponents or a combination of two or more such components for carryingout the appropriate functionalities implemented or supported by server162. In particular embodiments, social-networking system 160 may includeone or more data stores 164. Data stores 164 may be used to storevarious types of information. In particular embodiments, the informationstored in data stores 164 may be organized according to specific datastructures. In particular embodiments, each data store 164 may be arelational, columnar, correlation, or other suitable database. Althoughthis disclosure describes or illustrates particular types of databases,this disclosure contemplates any suitable types of databases. Particularembodiments may provide interfaces that enable a client system 130, asocial-networking system 160, or a third-party system 170 to manage,retrieve, modify, add, or delete, the information stored in data store164.

In particular embodiments, social-networking system 160 may store one ormore social graphs in one or more data stores 164. In particularembodiments, a social graph may include multiple nodes—which may includemultiple user nodes (each corresponding to a particular user) ormultiple concept nodes (each corresponding to a particular concept)—andmultiple edges connecting the nodes. Social-networking system 160 mayprovide users of the online social network the ability to communicateand interact with other users. In particular embodiments, users may jointhe online social network via social-networking system 160 and then addconnections (e.g., relationships) to a number of other users ofsocial-networking system 160 to whom they want to be connected. Herein,the term “friend” may refer to any other user of social-networkingsystem 160 with whom a user has formed a connection, association, orrelationship via social-networking system 160.

In particular embodiments, social-networking system 160 may provideusers with the ability to take actions on various types of items orobjects, supported by social-networking system 160. As an example andnot by way of limitation, the items and objects may include groups orsocial networks to which users of social-networking system 160 maybelong, events or calendar entries in which a user might be interested,computer-based applications that a user may use, transactions that allowusers to buy or sell items via the service, interactions withadvertisements that a user may perform, or other suitable items orobjects. A user may interact with anything that is capable of beingrepresented in social-networking system 160 or by an external system ofthird-party system 170, which is separate from social-networking system160 and coupled to social-networking system 160 via a network 110.

In particular embodiments, social-networking system 160 may be capableof linking a variety of entities. As an example and not by way oflimitation, social-networking system 160 may enable users to interactwith each other as well as receive content from third-party systems 170or other entities, or to allow users to interact with these entitiesthrough an application programming interfaces (API) or othercommunication channels.

In particular embodiments, a third-party system 170 may include one ormore types of servers, one or more data stores, one or more interfaces,including but not limited to APIs, one or more web services, one or morecontent sources, one or more networks, or any other suitable components,e.g., that servers may communicate with. A third-party system 170 may beoperated by a different entity from an entity operatingsocial-networking system 160. In particular embodiments, however,social-networking system 160 and third-party systems 170 may operate inconjunction with each other to provide social-networking services tousers of social-networking system 160 or third-party systems 170. Inthis sense, social-networking system 160 may provide a platform, orbackbone, which other systems, such as third-party systems 170, may useto provide social-networking services and functionality to users acrossthe Internet.

In particular embodiments, a third-party system 170 may include athird-party content object provider. A third-party content objectprovider may include one or more sources of content objects, which maybe communicated to a client system 130. As an example and not by way oflimitation, content objects may include information regarding things oractivities of interest to the user, such as, for example, movie showtimes, movie reviews, restaurant reviews, restaurant menus, productinformation and reviews, or other suitable information. As anotherexample and not by way of limitation, content objects may includeincentive content objects, such as coupons, discount tickets, giftcertificates, or other suitable incentive objects.

In particular embodiments, social-networking system 160 also includesuser-generated content objects, which may enhance a user's interactionswith social-networking system 160. User-generated content may includeanything a user can add, upload, send, or “post” to social-networkingsystem 160. As an example and not by way of limitation, a usercommunicates posts to social-networking system 160 from a client system130. Posts may include data such as status updates or other textualdata, location information, photos, videos, links, music or othersimilar data or media. Content may also be added to social-networkingsystem 160 by a third-party through a “communication channel,” such as anewsfeed or stream.

In particular embodiments, social-networking system 160 may include avariety of servers, sub-systems, programs, modules, logs, and datastores. In particular embodiments, social-networking system 160 mayinclude one or more of the following: a web server, action logger,API-request server, relevance-and-ranking engine, content-objectclassifier, notification controller, action log,third-party-content-object-exposure log, inference module,authorization/privacy server, search module, advertisement-targetingmodule, user-interface module, user-profile store, connection store,third-party content store, or location store. Social-networking system160 may also include suitable components such as network interfaces,security mechanisms, load balancers, failover servers,management-and-network-operations consoles, other suitable components,or any suitable combination thereof. In particular embodiments,social-networking system 160 may include one or more user-profile storesfor storing user profiles. A user profile may include, for example,biographic information, demographic information, behavioral information,social information, or other types of descriptive information, such aswork experience, educational history, hobbies or preferences, interests,affinities, or location. Interest information may include interestsrelated to one or more categories. Categories may be general orspecific. As an example and not by way of limitation, if a user “likes”an article about a brand of shoes the category may be the brand, or thegeneral category of “shoes” or “clothing.” A connection store may beused for storing connection information about users. The connectioninformation may indicate users who have similar or common workexperience, group memberships, hobbies, educational history, or are inany way related or share common attributes. The connection informationmay also include user-defined connections between different users andcontent (both internal and external). A web server may be used forlinking social-networking system 160 to one or more client systems 130or one or more third-party system 170 via network 110. The web servermay include a mail server or other messaging functionality for receivingand routing messages between social-networking system 160 and one ormore client systems 130. An API-request server may allow a third-partysystem 170 to access information from social-networking system 160 bycalling one or more APIs. An action logger may be used to receivecommunications from a web server about a user's actions on or offsocial-networking system 160. In conjunction with the action log, athird-party-content-object log may be maintained of user exposures tothird-party-content objects. A notification controller may provideinformation regarding content objects to a client system 130.Information may be pushed to a client system 130 as notifications, orinformation may be pulled from client system 130 responsive to a requestreceived from client system 130. Authorization servers may be used toenforce one or more privacy settings of the users of social-networkingsystem 160. A privacy setting of a user determines how particularinformation associated with a user can be shared. The authorizationserver may allow users to opt in to or opt out of having their actionslogged by social-networking system 160 or shared with other systems(e.g., third-party system 170), such as, for example, by settingappropriate privacy settings. Third-party-content-object stores may beused to store content objects received from third parties, such as athird-party system 170. Location stores may be used for storing locationinformation received from client systems 130 associated with users.Advertisement-pricing modules may combine social information, thecurrent time, location information, or other suitable information toprovide relevant advertisements, in the form of notifications, to auser.

FIG. 2 illustrates example social graph 200. In particular embodiments,social-networking system 160 may store one or more social graphs 200 inone or more data stores. In particular embodiments, social graph 200 mayinclude multiple nodes—which may include multiple user nodes 202 ormultiple concept nodes 204—and multiple edges 206 connecting the nodes.Example social graph 200 illustrated in FIG. 2 is shown, for didacticpurposes, in a two-dimensional visual map representation. In particularembodiments, a social-networking system 160, client system 130, orthird-party system 170 may access social graph 200 and relatedsocial-graph information for suitable applications. The nodes and edgesof social graph 200 may be stored as data objects, for example, in adata store (such as a social-graph database). Such a data store mayinclude one or more searchable or queryable indexes of nodes or edges ofsocial graph 200.

In particular embodiments, a user node 202 may correspond to a user ofsocial-networking system 160. As an example and not by way oflimitation, a user may be an individual (human user), an entity (e.g.,an enterprise, business, or third-party application), or a group (e.g.,of individuals or entities) that interacts or communicates with or oversocial-networking system 160. In particular embodiments, when a userregisters for an account with social-networking system 160,social-networking system 160 may create a user node 202 corresponding tothe user, and store the user node 202 in one or more data stores. Usersand user nodes 202 described herein may, where appropriate, refer toregistered users and user nodes 202 associated with registered users. Inaddition or as an alternative, users and user nodes 202 described hereinmay, where appropriate, refer to users that have not registered withsocial-networking system 160. In particular embodiments, a user node 202may be associated with information provided by a user or informationgathered by various systems, including social-networking system 160. Asan example and not by way of limitation, a user may provide his or hername, profile picture, contact information, birth date, sex, maritalstatus, family status, employment, education background, preferences,interests, or other demographic information. In particular embodiments,a user node 202 may be associated with one or more data objectscorresponding to information associated with a user. In particularembodiments, a user node 202 may correspond to one or more webpages.

In particular embodiments, a concept node 204 may correspond to aconcept. As an example and not by way of limitation, a concept maycorrespond to a place (such as, for example, a movie theater,restaurant, landmark, or city); a website (such as, for example, awebsite associated with social-network system 160 or a third-partywebsite associated with a web-application server); an entity (such as,for example, a person, business, group, sports team, or celebrity); aresource (such as, for example, an audio file, video file, digitalphoto, text file, structured document, or application) which may belocated within social-networking system 160 or on an external server,such as a web-application server; real or intellectual property (suchas, for example, a sculpture, painting, movie, game, song, idea,photograph, or written work); a game; an activity; an idea or theory; anobject in a augmented/virtual reality environment; another suitableconcept; or two or more such concepts. A concept node 204 may beassociated with information of a concept provided by a user orinformation gathered by various systems, including social-networkingsystem 160. As an example and not by way of limitation, information of aconcept may include a name or a title; one or more images (e.g., animage of the cover page of a book); a location (e.g., an address or ageographical location); a website (which may be associated with a URL);contact information (e.g., a phone number or an email address); othersuitable concept information; or any suitable combination of suchinformation. In particular embodiments, a concept node 204 may beassociated with one or more data objects corresponding to informationassociated with concept node 204. In particular embodiments, a conceptnode 204 may correspond to one or more webpages.

In particular embodiments, a node in social graph 200 may represent orbe represented by a webpage (which may be referred to as a “profilepage”). Profile pages may be hosted by or accessible tosocial-networking system 160. Profile pages may also be hosted onthird-party websites associated with a third-party server 170. As anexample and not by way of limitation, a profile page corresponding to aparticular external webpage may be the particular external webpage andthe profile page may correspond to a particular concept node 204.Profile pages may be viewable by all or a selected subset of otherusers. As an example and not by way of limitation, a user node 202 mayhave a corresponding user-profile page in which the corresponding usermay add content, make declarations, or otherwise express him or herself. As another example and not by way of limitation, a concept node204 may have a corresponding concept-profile page in which one or moreusers may add content, make declarations, or express themselves,particularly in relation to the concept corresponding to concept node204.

In particular embodiments, a concept node 204 may represent athird-party webpage or resource hosted by a third-party system 170. Thethird-party webpage or resource may include, among other elements,content, a selectable or other icon, or other inter-actable object(which may be implemented, for example, in JavaScript, AJAX, or PHPcodes) representing an action or activity. As an example and not by wayof limitation, a third-party webpage may include a selectable icon suchas “like,” “check-in,” “eat,” “recommend,” or another suitable action oractivity. A user viewing the third-party webpage may perform an actionby selecting one of the icons (e.g., “check-in”), causing a clientsystem 130 to send to social-networking system 160 a message indicatingthe user's action. In response to the message, social-networking system160 may create an edge (e.g., a check-in-type edge) between a user node202 corresponding to the user and a concept node 204 corresponding tothe third-party webpage or resource and store edge 206 in one or moredata stores.

In particular embodiments, a pair of nodes in social graph 200 may beconnected to each other by one or more edges 206. An edge 206 connectinga pair of nodes may represent a relationship between the pair of nodes.In particular embodiments, an edge 206 may include or represent one ormore data objects or attributes corresponding to the relationshipbetween a pair of nodes. As an example and not by way of limitation, afirst user may indicate that a second user is a “friend” of the firstuser. In response to this indication, social-networking system 160 maysend a “friend request” to the second user. If the second user confirmsthe “friend request,” social-networking system 160 may create an edge206 connecting the first user's user node 202 to the second user's usernode 202 in social graph 200 and store edge 206 as social-graphinformation in one or more of data stores 164. In the example of FIG. 2,social graph 200 includes an edge 206 indicating a friend relationbetween user nodes 202 of user “A” and user “B” and an edge indicating afriend relation between user nodes 202 of user “C” and user “B.”Although this disclosure describes or illustrates particular edges 206with particular attributes connecting particular user nodes 202, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202. As an example and not by way oflimitation, an edge 206 may represent a friendship, family relationship,business or employment relationship, fan relationship (including, e.g.,liking, etc.), follower relationship, visitor relationship (including,e.g., accessing, viewing, checking-in, sharing, etc.), subscriberrelationship, superior/subordinate relationship, reciprocalrelationship, non-reciprocal relationship, another suitable type ofrelationship, or two or more such relationships. Moreover, although thisdisclosure generally describes nodes as being connected, this disclosurealso describes users or concepts as being connected. Herein, referencesto users or concepts being connected may, where appropriate, refer tothe nodes corresponding to those users or concepts being connected insocial graph 200 by one or more edges 206.

In particular embodiments, an edge 206 between a user node 202 and aconcept node 204 may represent a particular action or activity performedby a user associated with user node 202 toward a concept associated witha concept node 204. As an example and not by way of limitation, asillustrated in FIG. 2, a user may “like,” “attended,” “played,”“listened,” “cooked,” “worked at,” or “watched” a concept, each of whichmay correspond to an edge type or subtype. A concept-profile pagecorresponding to a concept node 204 may include, for example, aselectable “check in” icon (such as, for example, a clickable “check in”icon) or a selectable “add to favorites” icon. Similarly, after a userclicks these icons, social-networking system 160 may create a “favorite”edge or a “check in” edge in response to a user's action correspondingto a respective action. As another example and not by way of limitation,a user (user “C”) may listen to a particular song (“Imagine”) using aparticular application (SPOTIFY, which is an online music application).In this case, social-networking system 160 may create a “listened” edge206 and a “used” edge (as illustrated in FIG. 2) between user nodes 202corresponding to the user and concept nodes 204 corresponding to thesong and application to indicate that the user listened to the song andused the application. Moreover, social-networking system 160 may createa “played” edge 206 (as illustrated in FIG. 2) between concept nodes 204corresponding to the song and the application to indicate that theparticular song was played by the particular application. In this case,“played” edge 206 corresponds to an action performed by an externalapplication (SPOTIFY) on an external audio file (the song “Imagine”).Although this disclosure describes particular edges 206 with particularattributes connecting user nodes 202 and concept nodes 204, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202 and concept nodes 204. Moreover,although this disclosure describes edges between a user node 202 and aconcept node 204 representing a single relationship, this disclosurecontemplates edges between a user node 202 and a concept node 204representing one or more relationships. As an example and not by way oflimitation, an edge 206 may represent both that a user likes and hasused at a particular concept. Alternatively, another edge 206 mayrepresent each type of relationship (or multiples of a singlerelationship) between a user node 202 and a concept node 204 (asillustrated in FIG. 2 between user node 202 for user “E” and conceptnode 204 for “SPOTIFY”).

In particular embodiments, social-networking system 160 may create anedge 206 between a user node 202 and a concept node 204 in social graph200. As an example and not by way of limitation, a user viewing aconcept-profile page (such as, for example, by using a web browser or aspecial-purpose application hosted by the user's client system 130) mayindicate that he or she likes the concept represented by the conceptnode 204 by clicking or selecting a “Like” icon, which may cause theuser's client system 130 to send to social-networking system 160 amessage indicating the user's liking of the concept associated with theconcept-profile page. In response to the message, social-networkingsystem 160 may create an edge 206 between user node 202 associated withthe user and concept node 204, as illustrated by “like” edge 206 betweenthe user and concept node 204. In particular embodiments,social-networking system 160 may store an edge 206 in one or more datastores. In particular embodiments, an edge 206 may be automaticallyformed by social-networking system 160 in response to a particular useraction. As an example and not by way of limitation, if a first useruploads a picture, watches a movie, or listens to a song, an edge 206may be formed between user node 202 corresponding to the first user andconcept nodes 204 corresponding to those concepts. Although thisdisclosure describes forming particular edges 206 in particular manners,this disclosure contemplates forming any suitable edges 206 in anysuitable manner.

In particular embodiments, social-networking system 160 may determinethe social-graph affinity (which may be referred to herein as“affinity”) of various social-graph entities for each other. Affinitymay represent the strength of a relationship or level of interestbetween particular objects associated with the online social network,such as users, concepts, content, actions, advertisements, other objectsassociated with the online social network, or any suitable combinationthereof. Affinity may also be determined with respect to objectsassociated with third-party systems 170 or other suitable systems. Anoverall affinity for a social-graph entity for each user, subjectmatter, or type of content may be established. The overall affinity maychange based on continued monitoring of the actions or relationshipsassociated with the social-graph entity. Although this disclosuredescribes determining particular affinities in a particular manner, thisdisclosure contemplates determining any suitable affinities in anysuitable manner.

In particular embodiments, social-networking system 160 may measure orquantify social-graph affinity using an affinity coefficient (which maybe referred to herein as “coefficient”). The coefficient may representor quantify the strength of a relationship between particular objectsassociated with the online social network. The coefficient may alsorepresent a probability or function that measures a predictedprobability that a user will perform a particular action based on theuser's interest in the action. In this way, a user's future actions maybe predicted based on the user's prior actions, where the coefficientmay be calculated at least in part a the history of the user's actions.Coefficients may be used to predict any number of actions, which may bewithin or outside of the online social network. As an example and not byway of limitation, these actions may include various types ofcommunications, such as sending messages, posting content, or commentingon content; various types of an observation actions, such as accessingor viewing profile pages, media, or other suitable content; varioustypes of coincidence information about two or more social-graphentities, such as being in the same group, tagged in the samephotograph, checked-in at the same location, or attending the sameevent; or other suitable actions. Although this disclosure describesmeasuring affinity in a particular manner, this disclosure contemplatesmeasuring affinity in any suitable manner.

In particular embodiments, social-networking system 160 may use avariety of factors to calculate a coefficient. These factors mayinclude, for example, user actions, types of relationships betweenobjects, location information, other suitable factors, or anycombination thereof. In particular embodiments, different factors may beweighted differently when calculating the coefficient. The weights foreach factor may be static or the weights may change according to, forexample, the user, the type of relationship, the type of action, theuser's location, and so forth. Ratings for the factors may be combinedaccording to their weights to determine an overall coefficient for theuser. As an example and not by way of limitation, particular useractions may be assigned both a rating and a weight while a relationshipassociated with the particular user action is assigned a rating and acorrelating weight (e.g., so the weights total 100%). To calculate thecoefficient of a user towards a particular object, the rating assignedto the user's actions may comprise, for example, 60% of the overallcoefficient, while the relationship between the user and the object maycomprise 40% of the overall coefficient. In particular embodiments, thesocial-networking system 160 may consider a variety of variables whendetermining weights for various factors used to calculate a coefficient,such as, for example, the time since information was accessed, decayfactors, frequency of access, relationship to information orrelationship to the object about which information was accessed,relationship to social-graph entities connected to the object, short- orlong-term averages of user actions, user feedback, other suitablevariables, or any combination thereof. As an example and not by way oflimitation, a coefficient may include a decay factor that causes thestrength of the signal provided by particular actions to decay withtime, such that more recent actions are more relevant when calculatingthe coefficient. The ratings and weights may be continuously updatedbased on continued tracking of the actions upon which the coefficient isbased. Any type of process or algorithm may be employed for assigning,combining, averaging, and so forth the ratings for each factor and theweights assigned to the factors. In particular embodiments,social-networking system 160 may determine coefficients usingmachine-learning algorithms trained on historical actions and past userresponses, or data farmed from users by exposing them to various optionsand measuring responses. Although this disclosure describes calculatingcoefficients in a particular manner, this disclosure contemplatescalculating coefficients in any suitable manner.

In particular embodiments, social-networking system 160 may calculate acoefficient based on a user's actions. Social-networking system 160 maymonitor such actions on the online social network, on a third-partysystem 170, on other suitable systems, or any combination thereof. Anysuitable type of user actions may be tracked or monitored. Typical useractions include viewing profile pages, creating or posting content,interacting with content, tagging or being tagged in images, joininggroups, listing and confirming attendance at events, checking-in atlocations, liking particular pages, creating pages, and performing othertasks that facilitate social action. In particular embodiments,social-networking system 160 may calculate a coefficient based on theuser's actions with particular types of content. The content may beassociated with the online social network, a third-party system 170, oranother suitable system. The content may include users, profile pages,posts, news stories, headlines, instant messages, chat roomconversations, emails, advertisements, pictures, video, music, othersuitable objects, or any combination thereof. Social-networking system160 may analyze a user's actions to determine whether one or more of theactions indicate an affinity for subject matter, content, other users,and so forth. As an example and not by way of limitation, if a user maymake frequently posts content related to “coffee” or variants thereof,social-networking system 160 may determine the user has a highcoefficient with respect to the concept “coffee”. Particular actions ortypes of actions may be assigned a higher weight and/or rating thanother actions, which may affect the overall calculated coefficient. Asan example and not by way of limitation, if a first user emails a seconduser, the weight or the rating for the action may be higher than if thefirst user simply views the user-profile page for the second user.

In particular embodiments, social-networking system 160 may calculate acoefficient based on the type of relationship between particularobjects. Referencing the social graph 200, social-networking system 160may analyze the number and/or type of edges 206 connecting particularuser nodes 202 and concept nodes 204 when calculating a coefficient. Asan example and not by way of limitation, user nodes 202 that areconnected by a spouse-type edge (representing that the two users aremarried) may be assigned a higher coefficient than a user nodes 202 thatare connected by a friend-type edge. In other words, depending upon theweights assigned to the actions and relationships for the particularuser, the overall affinity may be determined to be higher for contentabout the user's spouse than for content about the user's friend. Inparticular embodiments, the relationships a user has with another objectmay affect the weights and/or the ratings of the user's actions withrespect to calculating the coefficient for that object. As an exampleand not by way of limitation, if a user is tagged in first photo, butmerely likes a second photo, social-networking system 160 may determinethat the user has a higher coefficient with respect to the first photothan the second photo because having a tagged-in-type relationship withcontent may be assigned a higher weight and/or rating than having alike-type relationship with content. In particular embodiments,social-networking system 160 may calculate a coefficient for a firstuser based on the relationship one or more second users have with aparticular object. In other words, the connections and coefficientsother users have with an object may affect the first user's coefficientfor the object. As an example and not by way of limitation, if a firstuser is connected to or has a high coefficient for one or more secondusers, and those second users are connected to or have a highcoefficient for a particular object, social-networking system 160 maydetermine that the first user should also have a relatively highcoefficient for the particular object. In particular embodiments, thecoefficient may be based on the degree of separation between particularobjects. The lower coefficient may represent the decreasing likelihoodthat the first user will share an interest in content objects of theuser that is indirectly connected to the first user in the social graph200. As an example and not by way of limitation, social-graph entitiesthat are closer in the social graph 200 (e.g., fewer degrees ofseparation) may have a higher coefficient than entities that are furtherapart in the social graph 200.

In particular embodiments, social-networking system 160 may calculate acoefficient based on location information. Objects that aregeographically closer to each other may be considered to be more relatedor of more interest to each other than more distant objects. Inparticular embodiments, the coefficient of a user towards a particularobject may be based on the proximity of the object's location to acurrent location associated with the user (or the location of a clientsystem 130 of the user). A first user may be more interested in otherusers or concepts that are closer to the first user. As an example andnot by way of limitation, if a user is one mile from an airport and twomiles from a gas station, social-networking system 160 may determinethat the user has a higher coefficient for the airport than the gasstation based on the proximity of the airport to the user.

In particular embodiments, social-networking system 160 may performparticular actions with respect to a user based on coefficientinformation. Coefficients may be used to predict whether a user willperform a particular action based on the user's interest in the action.A coefficient may be used when generating or presenting any type ofobjects to a user, such as advertisements, search results, news stories,media, messages, notifications, or other suitable objects. Thecoefficient may also be utilized to rank and order such objects, asappropriate. In this way, social-networking system 160 may provideinformation that is relevant to user's interests and currentcircumstances, increasing the likelihood that they will find suchinformation of interest. In particular embodiments, social-networkingsystem 160 may generate content based on coefficient information.Content objects may be provided or selected based on coefficientsspecific to a user. As an example and not by way of limitation, thecoefficient may be used to generate media for the user, where the usermay be presented with media for which the user has a high overallcoefficient with respect to the media object. As another example and notby way of limitation, the coefficient may be used to generateadvertisements for the user, where the user may be presented withadvertisements for which the user has a high overall coefficient withrespect to the advertised object. In particular embodiments,social-networking system 160 may generate search results based oncoefficient information. Search results for a particular user may bescored or ranked based on the coefficient associated with the searchresults with respect to the querying user. As an example and not by wayof limitation, search results corresponding to objects with highercoefficients may be ranked higher on a search-results page than resultscorresponding to objects having lower coefficients.

In particular embodiments, social-networking system 160 may calculate acoefficient in response to a request for a coefficient from a particularsystem or process. To predict the likely actions a user may take (or maybe the subject of) in a given situation, any process may request acalculated coefficient for a user. The request may also include a set ofweights to use for various factors used to calculate the coefficient.This request may come from a process running on the online socialnetwork, from a third-party system 170 (e.g., via an API or othercommunication channel), or from another suitable system. In response tothe request, social-networking system 160 may calculate the coefficient(or access the coefficient information if it has previously beencalculated and stored). In particular embodiments, social-networkingsystem 160 may measure an affinity with respect to a particular process.Different processes (both internal and external to the online socialnetwork) may request a coefficient for a particular object or set ofobjects. Social-networking system 160 may provide a measure of affinitythat is relevant to the particular process that requested the measure ofaffinity. In this way, each process receives a measure of affinity thatis tailored for the different context in which the process will use themeasure of affinity.

In connection with social-graph affinity and affinity coefficients,particular embodiments may utilize one or more systems, components,elements, functions, methods, operations, or steps disclosed in U.S.patent application Ser. No. 11/503,093, filed 11 Aug. 2006, U.S. patentapplication Ser. No. 12/977,027, filed 22 Dec. 2010, U.S. patentapplication Ser. No. 12/978,265, filed 23 Dec. 2010, and U.S. patentapplication Ser. No. 13/632,869, filed 1 Oct. 2012, each of which isincorporated by reference.

In particular embodiments, one or more of the content objects of theonline social network may be associated with a privacy setting. Theprivacy settings (or “access settings”) for an object may be stored inany suitable manner, such as, for example, in association with theobject, in an index on an authorization server, in another suitablemanner, or any combination thereof. A privacy setting of an object mayspecify how the object (or particular information associated with anobject) can be accessed (e.g., viewed or shared) using the online socialnetwork. Where the privacy settings for an object allow a particularuser to access that object, the object may be described as being“visible” with respect to that user. As an example and not by way oflimitation, a user of the online social network may specify privacysettings for a user-profile page that identify a set of users that mayaccess the work experience information on the user-profile page, thusexcluding other users from accessing the information. In particularembodiments, the privacy settings may specify a “blocked list” of usersthat should not be allowed to access certain information associated withthe object. In other words, the blocked list may specify one or moreusers or entities for which an object is not visible. As an example andnot by way of limitation, a user may specify a set of users that may notaccess photos albums associated with the user, thus excluding thoseusers from accessing the photo albums (while also possibly allowingcertain users not within the set of users to access the photo albums).In particular embodiments, privacy settings may be associated withparticular social-graph elements. Privacy settings of a social-graphelement, such as a node or an edge, may specify how the social-graphelement, information associated with the social-graph element, orcontent objects associated with the social-graph element can be accessedusing the online social network. As an example and not by way oflimitation, a particular concept node 204 corresponding to a particularphoto may have a privacy setting specifying that the photo may only beaccessed by users tagged in the photo and their friends. In particularembodiments, privacy settings may allow users to opt in or opt out ofhaving their actions logged by social-networking system 160 or sharedwith other systems (e.g., third-party system 170). In particularembodiments, the privacy settings associated with an object may specifyany suitable granularity of permitted access or denial of access. As anexample and not by way of limitation, access or denial of access may bespecified for particular users (e.g., only me, my roommates, and myboss), users within a particular degrees-of-separation (e.g., friends,or friends-of-friends), user groups (e.g., the gaming club, my family),user networks (e.g., employees of particular employers, students oralumni of particular university), all users (“public”), no users(“private”), users of third-party systems 170, particular applications(e.g., third-party applications, external websites), other suitableusers or entities, or any combination thereof. Although this disclosuredescribes using particular privacy settings in a particular manner, thisdisclosure contemplates using any suitable privacy settings in anysuitable manner.

In particular embodiments, one or more servers 162 may beauthorization/privacy servers for enforcing privacy settings. Inresponse to a request from a user (or other entity) for a particularobject stored in a data store 164, social-networking system 160 may senda request to the data store 164 for the object. The request may identifythe user associated with the request and may only be sent to the user(or a client system 130 of the user) if the authorization serverdetermines that the user is authorized to access the object based on theprivacy settings associated with the object. If the requesting user isnot authorized to access the object, the authorization server mayprevent the requested object from being retrieved from the data store164, or may prevent the requested object from be sent to the user. Inthe search query context, an object may only be generated as a searchresult if the querying user is authorized to access the object. In otherwords, the object may have a visibility that is visible to the queryinguser. If the object has a visibility that is not visible to the user,the object may be excluded from the search results. Although thisdisclosure describes enforcing privacy settings in a particular manner,this disclosure contemplates enforcing privacy settings in any suitablemanner.

In particular embodiments, a system, described below, may providebenefits to the consumer/supplier/retailer/etc. In particularembodiments, the system may provide photos and/or videos for homemonitoring and communicating with family—potentially using local (andnot necessarily cloud) storage, and may access photos and videos storedin an online system, if connected. In further embodiments, the systemmay provide a social Wi-Fi communication network, in which the systemmay authorize a user's friends to join a particular WiFi communicationnetwork with no login necessary. In further embodiments, the system mayprovide robust privacy controls, in which the system may enable peopleto share data (to a social networking system/partner/third partyapplications) in contexts in which they may understand, may see thebenefits of sharing the data, and may provide consent. In furtherembodiments, the system may provide information as to who is at home andwhen a particular person left; this may be extended to friends nearby.In further embodiments, the system may provide virtual security wherebythe system may provide constant updates to a gateway for protectionagainst virus, malware, phishing, etc. In further embodiments, thesystem may use notifications to update based on any type of home eventand also the ability to remotely trigger a siren and/or contactemergency services (e.g., by dialing 911).

Instead of requiring the attention and effort of a user at home, thesystem, described below, is able to provide location awareness, identifymultiple individuals, and incorporate machine-learning support thatenables a user to have their house configure and adapt itself, as wellas responding to user commands. For example, the system may provide amore seamless experience to use, configure, and automated functionalityfor security-related devices, such as cameras, door sensors, door locksand motion sensors.

In particular embodiments, the system may create an open platform forconnecting a home into a seamless wireless experience. In particularembodiments, the system may provide a solution that harnesses a socialnetwork's key assets (e.g., identity, social graph, security, orexpertise driving open and affordable reference designs) to improve thehome and the family's experience interacting with its home. Inparticular embodiments, the system may enable an open platform tosupport and provide value to Internet of Things (IoT) device providers.

FIG. 3 illustrates an example architecture for managing a device cloudthat includes a set of devices. One or more connected devices 305 in thedevice cloud may be used to communicate with and control (actively orautomatically) one or more other connected devices 305 in the devicecloud. As described below, control interface or application may beprovided on control device 315 to control other devices 305 in thedevice cloud. In particular embodiments, system 300 may include agateway (GW) device 310 in communication with a number of connected or“smart” devices 305 and a control device 315. In particular embodiments,gateway device 310 may reside in a particular physical location.Connected devices 305 may include anything from complex embeddedcomputing devices to switches to simple sensors—for example, connecteddevices 305 illustrated in the example of FIG. 3 include a desktopcomputer, a laptop, a refrigerator, a home security system, atelevision, a vehicle, and a single-lens reflex (SLR) camera.

Control device 315 may present a user interface (UI) (e.g., by way of aninstalled control application, a browser, a short-messaging service(SMS) texting interface, or an interface provided by control device's315 operating system for interacting with gateway device 310 and withconnected devices 305 (by way of gateway device 310). As an example andnot by way of limitation, a user's smartphone or tablet 315 may displaya user interface for accessing or controlling connected devices 305 ofthe device cloud, such as for example, connected lights, aheating/cooling system, door-lock mechanism, or security system. Inparticular embodiments, control device 315 may provide controls forparticular “controllable” devices in the device cloud, e.g., those thatare sensed within a threshold proximity, those that include aremote-interaction interface by which the device can receive and processcommands for remote control, those for which the user has been grantedauthorization to control the device, or those that are available (e.g.,powered on, connected to a network, operational, and/or enabled forremote control). In particular embodiments, the control application ofcontrol device 315 may interface with a gateway application of gatewaydevice 310 to provide the functionality to control and interact withconnected devices 305 of the device cloud. In particular embodiments,control device 315 may include one or more UI clients (e.g., a messagingservice or control application), which acts as the main user experience(UX) point with system 300; social networking application or othermobile application—a helper application, used for initial provisioning,BLUETOOTH and location discovery, and generally anythingpermission-related that the messaging application cannot do. Herein,reference to provisioning may refer to a set-up process of preparing orconfiguring a device 305 for use on a particular system (e.g.,gateway-based system 300).

System 300 may provide superior in home connectivity for all IoT devices(e.g., platform as a product). Herein, reference to a controlapplication may refer to a browser-based application or anotherapplication installed on control device 315. In particular embodiments,the control application may be used by the user to provision connecteddevices 305. In further embodiments, the control application may providea specific UX for the user based on particular scenarios. In particularembodiments, the control application on control device 315 may enableviewing a list of connected devices 305 of system 300, setup of rulesregarding controlling connected devices 305, or push status updates fromconnected devices 305 to an application on the control device 315 (e.g.,control application).

In particular embodiments, connected devices 305 may be provisionedusing BLUETOOTH, NFC, or any other appropriate form of communicationsbetween the connected device 305 and gateway device 310. In particularembodiments, system 300 may provide a number of management features ofconnected devices 305. As an example and not by way of limitation, asocial graph or device graph, described herein, may be leveraged toconnect with people within the house or anywhere globally (e.g., voiceover internet protocol (VOIP), video calling)—also enable incoming photocaller ID pulling from the social graph (e.g., a social networkingapplication may be synchronized to the contacts on phones). Inparticular embodiments, system 300 may leverage social-networking system160, a social graph associated with social-networking system 160, adevice graph associated with social-networking system 160, particularidentities in a social graph, notifications provided to users, and an“open platform” approach.

In particular embodiments, system 300 may enable control of connecteddevices 305, such as for example, thermostats, vents, light control,blinds control, selective power times (car charging, laundry,dishwasher), or home-monitoring systems. As an example and not by way oflimitation, audio or video content may be unicast or multicast from anyconnected device 305 to any other connected device 305 connected throughgateway device 310. In particular embodiments, natural languageprocessing (NLP) technology, described below, may be leveraged to enablea user to verbally or textually control devices 305 of system 300. Inparticular embodiments, system 300 may track temperature, humidity, airquality, etc., of a home through sensors of connected devices 305 andsend alerts if issues are discovered. In particular embodiments, system300 may retrieve an event “feed” from connected devices 305 for use insuggesting rules based on past behavior and personalize the smart-homeexperience with regard to connected devices 305.

In particular embodiments, system 300 may display or “surface” the mostrelevant social-networking system 160 or third-party 170 information orstories, based on time of day, for each surface (e.g., connected device305) within the house with a display (weather, birthdays, relevantnews/public content, offers/deals, ads, etc.). As an example and not byway of limitation, any shared content may be surfaced on a display ofconnected devices 305 in the house via a social-networking application,a social media photo sharing application, a messaging application, etc.In particular embodiments the system 300 may provide an automatedshopping experience, in which the system may track purchasing andconsumption habits to assist in automating recurring purchases ofconsumables. In particular embodiments, the system 300 may provideinsight to a user's purchasing decisions. Awareness of home activitiesand of its dwellers may provide detailed insight as to how exactlysomeone goes about making a purchase decision. Factors such as, forexample, physical location in home, devices 305 used, number of familymembers viewing item, conversations, time between viewing, etc. may besensed and used in gaining a deeper understanding to the steps users gothrough in making purchase decisions and closing the loop on digital adsto physical purchasing (critical to measuring ad spend ROI).

In particular embodiments, the system 300 may provide a method foroptimizing ads and content based on the activity of what is happeningwithin the system 300. For example, understanding the currentenvironment in the home can help in both providing more appropriateconsumption content to family members (whether through social-networkingsystem 160, or media content in the home), or determine the mostappropriate timing to show ads. From simple things like advertising forthings that are missing or broken in the home, to showing the cool caradvertisement not when parents are running around and only checkingnotifications between feeding the kids and putting to bed, but ratherwhen they are leisurely scrolling news feed while the TV is playing ashow that only one of them watches passionately.

In particular embodiments, system 300 may expand the capabilities of agateway device 310 to serve as a central home computer and IoT hub. Infurther embodiments, the system 300 may provide local storage andsupport for all critical wired and wireless protocols for broadbandaccess to the outside world and communication between connected devices305 within the home at exceptional quality. In further embodiments, thesystem may develop analytic tools for connected third party devices andbroadband devices. In further embodiments, the system 300 may establishopen principles, run on standard protocols, generic hardware (HW),open-source operating systems, open-source APIs, etc. In furtherembodiments, the system 300 may contribute potential improvements inhardware and firmware wireless technology to communities of hardwarebuilders.

Such a system architecture may be used for connected devices 305 presentwithin a defined physical space (e.g., a house, an office building, or apark) or with a set of connected devices 305 related to a particularuser or entity (e.g., those associated with a user with connecteddevices in their home, their car, and their small retail business; orbelonging to a property management business managing door locks andalarm security systems for a group of buildings)—in this latterscenario, each of the physical locations (e.g., house, car, andbusiness) may each need their own gateway device 310.

Gateway device 310 may interface with a backend system 320, which may behosted on a remote server or group of servers. Backend system 320 mayinclude a messaging infrastructure 325 (e.g., to communicate withcontrol device 315) and an integration layer 330 (e.g., a platformand/or application-programming interface (API) to interface with adiverse array of connected devices 305, such as PARSE) to interfacebetween elements of backend system 320 and gateway device 310 (and/orcontrol device 315 and/or directly with connected devices 305). Backendsystem 320 may maintain a data store 332 of device events, includingdata received from gateway device 310 and each of the connected devices305, as well as data derived therefrom. Backend system 320 may alsomaintain a data store 334 for one or more device graphs, describedbelow, in which gateway device 310 and each of the connected devices 305may each be represented by a device node with device edges connectingthe device nodes. Backend system 320 may include adevice-graph-intelligence infrastructure 335 for processing andanalyzing the device events, updating the device graph, and providingfeedback and/or instructions to connected devices 305 and/or controldevice 315. Backend system 320 may also communicate withsocial-networking system 160. In particular embodiments, certainfunctionality may be provided by gateway device 310, by backend system320, or by a combination thereof.

In particular embodiments, a gateway device 310 may refer to anycomputing device capable of supporting the required functionality tofacilitate local network control of smart/connected device(s) 305 andact as a local gateway for a service that may run in the cloud. Herein,reference to a service may refer to a particular software functionalityor a set of particular software functionalities (e.g., the execution ofparticular operations). In particular embodiments, the service mayfacilitate communication with the user. In particular embodiments, thesystem 300 and the user may communicate using natural language (whichmay then be parsed, as described below). In particular embodiments, auser may use a messaging application to communicate with a gatewaydevice 310 and/or with any of the connected devices 305 (by way of thegateway device 310).

In particular embodiments, gateway device 310 may include any computingdevice comprising a processor, close-range networking capability, andthe capacity to perform some or all of the functionality describedherein. As an example and not by way of limitation, gateway device 310may be based on a standard computing device or server and a USB powercable; MICRO secure digital (SD) card and a MICRO SD card to standard SDcard adapter; WiFi dongle; BLUETOOTH dongle; HDMI cable and monitor; orZWAVE dongle. In particular embodiments, a HDMI cable may be insertedinto gateway device 310 to view the output of particular steps, howeverviewing the output is not required. In particular embodiments, the HDMIcable/monitor may be substituted for a USB-Serial cable that may beplugged into the gateway device 310. In particular embodiments, theremay be no need for dedicated hubs for different home control devices. Inparticular embodiments, provisioning of gateway device 310 may beperformed using BLUETOOTH low energy (BTLE).

In particular embodiments, gateway device 310 may include a gatewayapplication that runs on a local gateway device 310 connected to theuser's home network. In particular embodiments, gateway device 310(e.g., based on a RASPBERRY PI platform running RASPIAN Linux andsupporting WiFi, BLUETOOTH, ZWAVE and ZIGBEE dongles) may be used tohost the gateway application, described above. In particularembodiments, the gateway application may be supported by a limitednumber of devices, in particular, but not limited to: support discoveryand provisioning of two or more connected lights from multiple vendors(e.g., PHILLIPS HUE, BELKIN WEMO WiFi switch, ZIGBEE or ZWAVE smartswitch); control of one or more pre-provisioned smart locks (e.g.,LOCKITRON, AUGUST); control and streaming of content (e.g., music and/orvideo) to multiple devices 305 (e.g., WiFi-connected speakers, smartTVs, or the gateway device 310 itself (e.g., through a high-definitionmultimedia interface (HDMI) port)).

The gateway application's responsibilities may consist of understandingand dealing with the various smart/connected devices 305 at the“physical” level, including, but not limited to: discovery andprovisioning of new connected devices 305 over BLUETOOTH, ZIBGEE, ZWAVE,WI-FI (access point and direct); mapping of physical devices to devicetype and device ID; mapping of device type to available capabilities;grouping/association of devices 305 having the same capabilities or typein a “vertical” (e.g., “lights” or “door locks”); support forunderstanding various industry protocols (e.g., ALLJOYN, THREAD, WEAVE,or ZIGBEE); translating particular user intents (e.g., associated withspecific device IDs) passed from backend system 320 into commandmessages (e.g., “device ID(s) XXX on” may be translated by gatewaydevice 310 to “Phillips Hue device ID XXX turn on”); and translatingparticular device notifications into logical notifications that may beinterpreted by backend system 320 (e.g., “August SmartLock device ID XXXunlocked” may be translated by gateway device 310 to “device ID XXXunlocked”). In particular embodiments, while the gateway device 310 doessome mapping between physical and logical devices, gateway device 310may convert the messages into machine-readable structured formats. Inparticular embodiments, a user may explicitly group particular devices305 or particular devices 305 may be implicitly grouped based one ormore criteria (e.g., capability, location, previous interactions, ordevice-graph connections or device edges between nodes representingdevices 305 and node representing users).

In particular embodiments, once the user is logged in, the gatewayapplication may run periodic BT scans to detect connected devices 305.In further embodiments, for unknown, nearby connected devices 305,system 300 may: test the echo characteristics to check if connecteddevice 305 is password protected; show notifications to the user aboutconnected device 305; if the user clicks on the notification, ask if theuser wants to add connected device 305 to system 300; if connecteddevice 305 is password protected, ask the user for the password; if notpassword protected, add connected device 305 to system 300.

In particular embodiments, for known, nearby connected devices 305,system 300 may: if device 305 is connected to system 300, cache thestatus of connected device 305; test the cached password with echocharacteristics; if the password has been changed, show a notificationto the user; if connected device 305 is not connected to system 300,show a notification to the user; if the user clicks on eithernotifications, ask for password of WiFi credentials. In particularembodiments, all of these functions be performed through a devicedetails screen of the gateway application. In further embodiments, thedevice details screen may offer ability to rename connected device 305,set/change the password of connected device 305, explicitlydisconnect/update WiFi of connected device 305, or execute any commandssupported by connected device 305.

In particular embodiments, backend system 320 may include anapplication/service running in the cloud that is in communication withgateway device 310. Furthermore, backend system 320 may handleintegration with messaging applications and NLP systems, translation ofthe user's intent to specific logical device control intent (e.g., usingNLP and execution-context awareness) and machine learning (ML) to infercomplex behavior rules involving multiple connected devices 305. Inparticular embodiments, backend system 320 may only interface withindividual ones of connected devices 305 by way of gateway device 310.In particular embodiments, backend system 320 may deal with logicaldevices (e.g., “lights” vs “PHILLIPS HUE”), aliases assigned by a user(e.g., “front porch light”), and device groups (e.g., “all lights”). Inparticular embodiments, backend system 320 may map user aliases ofdevices 305 with logical IDs for the respective devices 305 provided bygateway device 310. As an example and not by way of limitation, a username “front porch light” may be associated with a particular device ID,described above). As another example, an alias for agrouping/association of devices 305 along a “horizontal” or location(e.g., “living room” or “front door) may be mapped to the respectivedevice IDs.

In particular embodiments, backend system 320 may map devicecapabilities of respective devices 305 to human or natural languageinput/output commands. As an example and not by way of limitation,specific intents from the user may be translated into a device ID basedactions (e.g., “Turn on Front Porch Light” may be translated by backendsystem 320 to “device ID(s) XXX on”). Conversely, device notificationsmay be translated to a human-readable or natural language format bybackend system 320 (e.g., “device ID XXX unlocked” may be translated bybackend system 320 to “Front Door Unlocked”). In particular embodiments,these natural language control and notifications of devices 305 may beperformed through a messaging application executed on control device315. Backend system 320 may create and execute multi-device instructions(e.g., “when front door is unlocked, turn the front porch lights on”).

In particular embodiments, to be able to interpret commands in acontext-aware fashion, backend system 320 may include logic to accessthe device graph, described below, to identify a user ID (correspondingto a user who wants to take action) and/or user location information(e.g., based on signals like cell tower IDs of mobile cellular networks,WiFi geolocation, visible service-set identifications (SSIDs), or stronglocalization via GPS coordinates). For example, a user might beassociated with gateway devices 310 associated with multiple locations(e.g., primary family home, weekend condo, secondary home), in whichcase, user location information may determine particular devices 305that a particular command should apply.

Location determination techniques may be most effective in determiningthe location of a client system (e.g. control device 315) in openspaces, but it is difficult to determine a location within a building,such as for example a mall or movie theater. In particular embodiments,the location of the client system may be determined through the use ofBTLE beacons that are part of an indoor positioning system. As anexample and not by way of limitation, the location services of theclient system may determine the client system is within proximity to aparticular building, but the location of the client system may berefined using BTLE beacons located within a store to determine if theclient system is inside or outside the building.

BTLE beacons are configured set to send a “proximity signal” atpre-determined time intervals. BLE beacons send a universally uniqueidentifier (UUID) and a major and minor code. The UUID is used toidentify a common group of beacons (e.g., associated with a particularstore) and the major and minor codes may be used to uniquely associate abeacon with a given location or area of a physical space, so that anysuitably equipped device nearby (such as a mobile device) can detect it.An application executed on the client system may process the proximitysignal from the BTLE beacon within the building and social-networkingsystem 160 may determine the client system is inside a building based onthe information encoded in the proximity signal. As an example and notby way of limitation, a home equipped with BTLE beacons maydifferentiate between control device 315 being currently located in theliving room or the kitchen of the beacon-equipped house. Although thisdisclosure describes particular methods of indoor-locationdetermination, this disclosure contemplates any suitable method ofindoor-location determination, such as for example, interior WI-FIrouter tracking.

In particular embodiments, a hub process running on gateway device 310may: (a) listen to pushes from integration layer 330; and (b) write thereceived push data (e.g., to standard output). In particularembodiments, the hub process may be written in C. In particularembodiments, a rules runtime interpreter may include a JAVASCRIPTapplication that reads locally-stored rules; spawns the hub process andmonitors the output of the hub process to: (a) parse the pushed datareceived from integration layer 330 and (b) based on the parsedinformation, do one or more of: updating the rules; storing new ruleslocally; executing device control; executing queries; discoveringdevices 305; parsing the rules; waiting for triggers (time or sensor)indicated by the rules; executing events on the triggers; executingdevice control; running a local webserver which allows triggering of therules via local networks.

In particular embodiments, adding a connected device 305 to system 300(e.g., by manually triggering a pairing process or being notified aboutauto-detected connected devices 305) may involve: generating a uniquecloud device ID for device 305, creating a cloud-object for connecteddevice 305 identified by the device ID and associate the cloud-object ongateway device 310, adding the cloud device ID to gateway device 310(the cloud will reference to device 305 using this ID), add the basicdata or characteristics of device 305 to the cloud, associate device 305with an entry in a table that contains prototypes for known connecteddevices 305, add metadata to connected device 305 from tags, where a taghas an associated type and value and resides within the context ofgateway device 310.

In particular embodiments, the gateway application sits betweenconnected devices 306 and backend system 320 through which the userinterfaces with in order to control connected devices 305 of the devicecloud. As such, the gateway application receives command messages sentfrom backend system 320 and converts the command messages toinstructions to control connected devices 305.

In particular embodiments, instructions controlling connected devices305 may be “pushed” from integration layer 330 of backend system 320 toconnected devices 305. As an example and not by way of limitation, theinstructions may include an application ID (e.g., device ID) associatedwith control device 315. In particular embodiments, the instructions mayinclude a flag or variable for directing the instructions to aparticular connected device 305, a grouping of connected devices 305, orall the connected devices 305 of the device cloud. As described above, aunique identifier is generated for each connected device 305 and may bestored in integration layer 330 in a data table. In particularembodiments, the instructions pushed to connected devices 305 maycorrespond to functions such as for example rule, discover, query,control, or update.

As an example and not by way of limitation, a rule function is a set ofinstructions to be performed by connected device 305 in accordance to aparticular condition. Example conditions may include a device basedcondition or a time-based condition. These conditions may be executingthe instructions when device 305 enters a certain state or at a set timeor day of week, respectively. In particular embodiments, a device cloud(e.g., in a home) may have a corresponding instance in the cloud. Eachdevice action (e.g., control instructions, device alert, etc.) may belogged and sent over a messaging queue of the device cloud instance. Arule may have a control instruction, which may be executed by connecteddevice 305 based on timing or triggered by another condition. Aparticular device cloud instance may have a rule execution engine fordigesting device action messaging queue and execute rules. In particularembodiments, a rule may be implemented as a series of commands.

In particular embodiments, a discover instruction returns a list ofconnected devices 305 that are currently connected to gateway device310. In particular embodiments, a query instruction returns the currentstatus of one or more connected devices 305. As an example and not byway of limitation, a query instruction may include a device identifierof connected device 305 and a type associated with connected device 305.In particular embodiments, a control instruction causes gateway device310 to change the current state of a specified connected device 305based on one or more configuration parameters or settings included withthe control instruction. The configuration settings may be specific tothe type of device 305 being controlled. As an example and not by way oflimitation, configuration settings for a connected light-bulb mayinclude power on, power off, brightness, or hue. As another example,configuration settings for a connected music player may include volumesetting, power on, power off, or particular content or playlist to beplayed.

In particular embodiments, elements of system 300 may include an API toprovide access profiles for applications interfacing with system 300,such as: gateway device 310: the central entity in the home interfacingall devices of that home and providing local access as well as theoffline experience; backend system 320: controls the home with naturallanguage from messaging application; a mobile app or browser-basedmanagement interface (either one running on control device 315) tomanage the device cloud.

As described above, a user may communicate via the control applicationto control, manage, or activate one or more connected devices 305 of auser's device cloud. Control device 315 may interact with connecteddevices 305 through the gateway application of gateway device 310. Inparticular embodiments, the functionality of the control application maybe incorporated in a messaging application, such that the messagingapplication may serve as both a messaging application with other usersand the control application to interact with connected devices 305 ofthe device cloud. As an example and not by way of limitation, amessaging application provides real-time text transmission between twoor more client systems over a communication network (e.g., WI-FI orcellular data network). In particular embodiments, text transmissionbetween client systems may be performed using a particular “chat” (e.g.,MQ telemetry transport (MQTT)) protocol or SMS protocol). Furthermore,messaging applications may also support file transfer, clickablehyperlinks, VOIP calls, or video chat functionality.

In particular embodiments, the user may have the ability to query,program, or manage connected devices 305 using the control application(e.g., messaging application). In particular embodiments, a human-likeor artificial intelligence may be implemented within a messagingapplication such that a user is able to use natural-language commandmessages to control, manage, or activate a user's connected devices 305.In particular embodiments, the command message sent by the messagingapplication may be a voice-transcribed message. As an example and not byway of limitation, the user may speak “list my home devices” to amicrophone of control device 315 and the messaging application maygenerate the command message using voice-transcription and send acorresponding command message to messaging infrastructure 325.Integration layer 330 may send instructions corresponding to thenatural-language command message to gateway device 310. In particularembodiments, backend system 320 has the ability to build an executioncontext from previously used connected devices 305 and implicitly inferwhich connected devices 305 to interact with. As an example and not byway of limitation, an execution context for the instructions maycorrespond to a time, place, commands, frequency that commands have beenperformed, or a number of times commands should be performed. As anotherexample, determining the execution context may include determining alevel of authorization for the user; determining permissions or privacysettings configured for connected devices 305; determining aninteraction history for the user; or determining a current location ofthe user.

In particular embodiments, the messaging application has the ability tounderstand human-natural language chat or messaging between users withinthe context of connected devices 305 through NLP. In particularembodiments, the command message may be sent to social-networking system160 to parse the text of the command message and identify one or moren-grams. In general, a n-gram is a contiguous sequence of n items from agiven sequence of text in the command message. As an example and not byway of limitation, the items may be characters, phonemes, syllables,letters, words, base pairs, prefixes, or other identifiable items fromthe sequence of text that makes up the command message. The n-gram mayinclude one or more characters of text (letters, numbers, punctuation,etc.) entered through the UI of the messaging application. In particularembodiments, each n-gram may include a character string (e.g., one ormore characters of text) of the command message. In particularembodiments, social-networking system 160 may return the identifiedn-grams to device-graph-intelligence infrastructure 335 of backendsystem 320 that may match the identified n-grams with nodes of thedevice graph stored in data store 334, as described below.

In particular embodiments, social-networking system 160 may returnnames, types, categories, or other identifiers that match the identifiedn-grams to backend system 320. The NLP process may use one or morematching algorithms to attempt to identify commands (e.g., control orquery), device IDs, or location names that match identified n-grams.When a match or matches are found, the NLP may send the names (namestrings) corresponding to particular connected devices 305 or groupingsof connected devices 305 as well as, potentially, other metadataassociated with the to device-graph-intelligence infrastructure 335.

In particular embodiments, social-networking system 160 may return theidentified n-grams to backend system 320. In particular embodiments,device-graph-intelligence infrastructure 335 may match the identifiedn-grams to an alias for a particular connected device 305, agrouping/association of connected devices 305 along a horizontal (e.g.,“living room” or “front door), or a grouping/association of connecteddevices 305 in a “vertical” (e.g., “lights” or “door locks”). Inparticular embodiments, device-graph-intelligence infrastructure 335 maymatch the identified n-grams to an alias for particular locations (e.g.,living room or backyard).

In particular embodiments, device-graph-intelligence infrastructure 335may match the identified n-grams to previous interactions with connecteddevices 305 stored in device events data store 332. As an example andnot by way of limitation, upon a user instructing (through text or audiomessaging on a messaging application) that a connected light be turnedon, backend system 320 may not need to be explicitly directed to aparticular connected light, but may be able to infer which connectedlight to turn on. In particular embodiments, this inference may be basedon previous interactions with connected devices 305 stored ondevice-events data store 332 and the current location of the user. As anexample and not by way of limitation, backend system 320 may determine,based previous interactions stored on device-events data store 332, thatthe user has on past occasions instructed the lights in the kitchen beturned on while in the kitchen. As another example,device-graph-intelligence infrastructure 335 may be able to infer basedon messaging infrastructure 325 sending the user a notificationregarding the kitchen light being turned on, that a subsequent commandmessage from the user to turn off a light refers to the kitchen lightthat was recently turned on.

In particular embodiments, based on the execution context, integrationlayer 330 may convert a command message received from messaginginfrastructure 325 into an instruction that is sent to gateway device310. As an example and not by way of limitation, a command message “turnon front porch light” may converted into an instruction “device ID(s)XXX on” based on the execution context of the current location of theuser being near the front porch and the user previously turning on thissame front porch light (from device events data store 332). As anotherexample, a command message “set temperature to 75° F. at 6 pm” may beconverted into an instruction of “device ID(s) XXX control temp=75time=18:00” based on the execution context of the user previouslyturning on the thermostat (e.g., from device events data store 332).

As described above, integration layer 330 may also receive a devicemessage from connected devices 305 and convert the device message to anatural-language message to be sent to control device 315 throughmessaging infrastructure 325. As an example and not by way oflimitation, the device messages may include status updates in responseto user queries, a request for additional information to clarify acommand message; a request to authenticate the user; a messageacknowledging the command message or confirming completion of theinstructions, a message stating that the instructions cannot beexecuted, or an alert regarding one or more of connected devices 305.

FIG. 4 illustrates an example device graph 400. In particularembodiments, backend system 320 may store one or more device graphs 400in device graph data store 324. In particular embodiments, device graph400 may be integrated with social graph 200 of social-networking system160. Device graph 400 may be analogous to social graph 200 and mayinclude multiple user nodes 202 (each corresponding to a particularuser) or multiple device nodes 404 (each corresponding to a particulardevice)—and multiple edges (e.g., 206 or includes a “device” edge 406).As an example and not by way of limitation, each connected device 305located in a user's home may be represented by a node 404 in devicegraph 400. In particular embodiments, device edges 406 connect nodescorresponding a particular connected device 305 to a node 202corresponding to a user, based on the user sending a command to orinteracting with the particular connected device 305. In particularembodiments, device graph 400 may include edges 206 between pairs ofuser nodes 202 representing a relationship between users, as describedwith regard to FIG. 2.

In particular embodiments, a device node 404 may correspond to aconnected or smart device 305. As described above, a connected or smartdevice 305 may correspond to a desktop computer, a laptop, ahead-mounted display (HMD), connected thermostat, refrigerator,home-security system, connected light-switch, connected light-bulb,connected-door lock, media server, television, vehicle, network router,web-enabled camera, single-lens reflex (SLR) camera; another suitabledevice; or two or more such devices. A device node 404 may be associatedwith information of a concept provided by a user or information gatheredby various systems, including social-networking system 160. As anexample and not by way of limitation, information of a connected device305 may include a name or a device ID; device type; device capabilities;a location (e.g., an address or a geographical location); owning user orentity; device alias assigned by the owner; other suitable deviceinformation; or any suitable combination of such information. Inparticular embodiments, a device node 404 may be associated with one ormore data objects corresponding to information associated with devicenode 404.

In particular embodiments, one or more of the “device” edges 406correspond to an action or setting associated with devices 305represented by device nodes 404. In particular embodiments, a deviceedge 406 between a user node 202 and a device node 404 may represent aparticular action or activity performed by a user associated with usernode 202 toward a device 305 associated with a device node 404. As anexample and not by way of limitation, as illustrated in FIG. 4, a usermay “lock,” “unlock,” “configure,” “logon,” or ““power on,” a device305, each of which may correspond to a device edge type or subtype. Asanother example, a user (user “F”) may configure to a particular device(“Car”) using a particular messaging application. In this case,social-networking system 160 may create a “configure” edge 406 (asillustrated in FIG. 4) between user node 202 corresponding to the userand device node 404 corresponding to the car. Although this disclosuredescribes particular device edges 406 with particular attributesconnecting user nodes 202 and device nodes 404, this disclosurecontemplates any suitable edges 206 with any suitable attributesconnecting user nodes 202 and concept nodes 204. Moreover, although thisdisclosure describes device edges between a user node 202 and a devicenode 404 representing a single type of relationship or interaction, thisdisclosure contemplates device edges between a user node 202 and adevice node 404 representing one or more types of relationships orinteraction. As an example and not by way of limitation, device edge 406may represent both that a user has “locked” and “unlocked” a particularconnected door lock. Alternatively, another device edge 406 mayrepresent each type of relationship (or multiples of a singlerelationship) between a user node 202 and a particular device node 404(as illustrated in FIG. 4 between user node 202 for user “B” and devicenode 404 for “Front Door”). In particular embodiments, social-networkingsystem 160 may modify or update device graph 400 to create a new deviceedge 406 connecting nodes 404 corresponding particular devices to a nodecorresponding to a new user based on the new user interacting or sendinga command to the particular connected device 305 for the first time. Inparticular embodiments, a new device node 404 and device edge 406 may becreated and connected to a particular user node 202 when the particularuser connects a new device 305 to gateway device 310 for the first time,as described above. As an example and not by way of limitation, devicegraph 400 may include device edges 406 connecting node representingother users (e.g., non-owner) to the user's device or between the user'sdevice (e.g., desktop computer) and other connected devices (e.g., smartthermostat).

In particular embodiments, the various object types associated withsystem 300 may be represented by a device node 404 or as attributes of adevice node 404 in device graph 400. As an example and not by way oflimitation, device nodes 404 (or attribute of device nodes 404) may beassociated with a connected device 305, a group of connected devices305, gateway device 310, a zone (e.g., horizontal), or a set of devicecapabilities. In particular embodiments, different device associationsmay be represented as device edges 406 in device graph 400. As anexample and not by way of limitation, device edges 406 may represent theassociation of connected devices 305 to gateway device 310, a user withgateway device 310, a user with connected devices 305, where permissionsregarding respective connected device 305 may be an attribute associatedwith the respective device edge 406, connected devices 305 to a group ofconnected devices (e.g., vertical), or connected devices 305 to a devicecapability set.

In particular embodiments, NLP, described above, may perform or cause tobe performed a search to identify existing device-graph elements havingrespective names, types, categories, or other identifiers matching theidentified n-grams. Furthermore, device-graph intelligenceinfrastructure 335 may use one or more matching algorithms to attempt toidentify user nodes 202, device nodes 404, or device edges 406 thatmatch the n-grams of the parsed command message sent by the messagingapplication. When a match or matches are found, device-graphintelligence infrastructure 335 may retrieve information that includes,for example, the names (name strings) of the matching nodes (e.g., user202 or device 404) as well as, potentially, other metadata associatedwith the matching nodes.

In particular embodiments, social-networking system 160 or backendsystem 320 may measure or quantify “device” affinity using a deviceaffinity coefficient (which may be referred to herein as “devicecoefficient”) that is analogous to the social-graph affinity describedabove. The device coefficient may represent or quantify the strength ofa relationship between particular objects associated with connecteddevices 305 and the users of connected devices 305. In particularembodiments, a variety of factors may be used to calculate a devicecoefficient. These factors may include, for example, user actions, typesof relationships between objects, location information, other suitablefactors, or any combination thereof. In particular embodiments,different factors may be weighted differently when calculating thedevice coefficient. The weights for each factor may be static or theweights may change according to, for example, the user, the type ofrelationship, the type of action, the user's location, and so forth. Inparticular embodiments, a variety of variables may be considered whendetermining weights for various factors used to calculate a devicecoefficient, such as, for example, the time since a particular userinteracted with a particular connected device 305, decay factors,frequency of interaction, relationship to information or relationship tothe connected device 305 about which information was accessed,relationship to device-graph entities connected to the connected device305, short- or long-term averages of user device interactions, othersuitable variables, or any combination thereof. As described above, adevice coefficient may include a decay factor that causes the strengthof the signal provided by particular interactions to decay with time,such that more recent interactions are more relevant when calculatingthe coefficient. The ratings and weights may be continuously updatedbased on continued tracking of the interactions upon which the devicecoefficient is based. Any type of process or algorithm may be employedfor assigning, combining, averaging, and so forth the ratings for eachfactor and the weights assigned to the factors. In particularembodiments, device coefficients may be determined usingmachine-learning algorithms trained on historical actions or past userinteractions. Although this disclosure describes calculating devicecoefficients in a particular manner, this disclosure contemplatescalculating device coefficients in any suitable manner.

In particular embodiments, a device coefficient may be calculated basedon a user's interactions with one or more connected devices 305. As anexample and not by way of limitation, if a user may make frequentlyinteract with a particular “front door,” the user may be determined tohave a high device coefficient with respect to the particular “frontdoor.” Particular device interactions or types of interactions may beassigned a higher weight and/or rating than other device interactions,which may affect the overall calculated device coefficient. As anexample and not by way of limitation, if a first user “configures” a“thermostat” (e.g., set the temperature), the weight or the rating forthat particular interaction may be higher than if the first user simply“powers on” the “thermostat.” In particular embodiments, the devicecoefficient may be based on the degree of separation between particulardevice-graph objects (e.g., device nodes). In particular embodiments, adevice coefficient may be calculated based on the type of relationshipbetween the particular users connected to a particular device.

FIG. 5 illustrates an example method for controlling connected devices.The method 500 may start at step 510, where a computer server machinemay receive a command message from a client device associated with auser. In particular embodiments, the command message is sent through amessaging application. At step 520, the computer server machine mayparse the command message. In particular embodiments, the parsingidentifies one or more n-grams of the command message. In particularembodiments, at step 520, the computer server machine accesses a devicegraph. In particular embodiments, the device graph includes at least onenode representing the user, and one or more nodes that each represent arespective one of the connected devices. At step 530, the computerserver machine identifies, based on the parsed command message, one ormore of a plurality of connected devices. In particular embodiments, thecomputer server machine identifying the one or more of the plurality ofconnected devices based at least in part on one or more of theidentified n-grams matching the one or more of the nodes representingthe respective one of the connected devices. At step 540, the computerserver machine determines, based on the parsed command message, one ormore instructions for the identified connected devices. At step 550, thecomputer server machine provides the instructions to the identifiedconnected devices. In particular embodiments, at step 555, the computerserver machine updates the device graph. In particular embodiments, thecomputer server machine updates the device graph to add an edgeconnecting the node representing the user with the one or more nodeseach representing the respective one of the identified connecteddevices. Particular embodiments may repeat one or more steps of themethod of FIG. 5, where appropriate. Although this disclosure describesand illustrates particular steps of the method of FIG. 5 as occurring ina particular order, this disclosure contemplates any suitable steps ofthe method of FIG. 5 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method forcontrolling connected devices, including the particular steps of themethod of FIG. 5, this disclosure contemplates any suitable method forcontrolling connected devices, including any suitable steps, which mayinclude all, some, or none of the steps of the method of FIG. 5, whereappropriate. Furthermore, although this disclosure describes andillustrates particular components, devices, or systems carrying outparticular steps of the method of FIG. 5, this disclosure contemplatesany suitable combination of any suitable components, devices, or systemscarrying out any suitable steps of the method of FIG. 5.

In particular embodiments, the system 300 may provide for configurationof user-role settings (user, command, or location-based) in the devicegraph (e.g., permission models may allow for configuration of anadministrator role for full control or a limited-user role with limitedpermissions). For example, a user may not want their children (who areplaying in the living room where the stereo system is located) to changethe music the user is currently being enjoyed while working in his homeoffice.

Gateway device 310 may have one owner and other users may beauthenticated to control one or more connected devices 305. Inparticular embodiments, a user (e.g., owner) may provide one or moreother users (e.g., friend or family member) temporary access toconnected devices 305 to through a command message sent using amessaging application, such that the messaging application acts as agroup framework for authorization. As an example and not by way oflimitation, access and authorization to one or more connected devices305 may be provided to another user by adding the other user to amessaging chat session. As described above, natural-language commandmessages may be sent through a messaging application. As an example andnot by way of limitation, a user may input a natural-language commandmessage “give user ‘B’ key access to front door.” In particularembodiments, backend system 320 may request that the user add user “B”to a group chat on the messaging app as part of the authorizationprocess. In particular embodiments, backend system 320 may determine twousers (e.g., the user and user “B”) have a social-graph coefficient,described above, that satisfies a pre-defined threshold. In this case, auser (e.g., user “B”) may be allowed temporary access to connecteddevice 305 (e.g., front door). As an example and not by way oflimitation, integration layer 330 may send a temporary door-open tokento a client system of the other user (e.g., user “B”) via that messagingapplication, such that when the friend is in the user's neighborhood,the friend may stop by the user's house and freely enter the front door.

In particular embodiments, the pre-defined threshold may be based on adevice coefficient between the other user (e.g., user “B’) and theparticular connected device 305 (e.g., front door), described above,satisfying a pre-defined threshold. As an example and not by way oflimitation, user “B” may be temporarily authorized to access the frontdoor based on user “B” based on user “B” having a high devicecoefficient with the front door (e.g., frequent interaction with thefront door). In particular embodiments, a level of authorization of theuser for a particular connected device 305 may be based onaffinity/social graph, group membership, profile data, or skillcertification. In particular embodiments, the backend connection to thehub process may be the channel authorization for the use of the token(e.g., the sender of the token needs to have the permissions to share).In particular embodiments, a message may be sent to the user indicatingthe status of connected device 305 once the other user interacts withconnected device 305.

As another example, system 300 may grant a time-limited access to acommunication network (e.g., Wi-Fi) by creating temporary Wi-Fi networksand thereafter deleting the temporary Wi-Fi networks after a time limithas elapsed. As another example, a temporary Wi-Fi SSID may be broadcastthrough an out of band mechanism (e.g., through an event invitation orpush notification sent through the messaging application), therebyallowing for automatic connections when particular users arrive withinthe vicinity of the Wi-Fi, or arrive to a particular location (e.g., ifthe SSID is hidden). In particular embodiments, the system may enablethe transfer of personal information. In further embodiments, the systemmay include a user authentication token. In further embodiments, theidentified account information may be fetched by the device onceconnected to the internet with the user token. In particularembodiments, a user may be authenticated by, but not limited to: a name,profile name, e-mail, phone number, or family circle. In furtherembodiments, information may be transferred by WiFi networks, BLUETOOTHMACs, or other associated IoT devices.

In particular embodiments, access or control of one or more connecteddevices 305 associated with may be provided on a temporary basis througha messaging application. As an example and not by way of limitation,users that were invited come to an area of the event, may receive anotification to join an event Wi-Fi network. If user accepts, the usermay automatically transitioned over to the event Wi-Fi network.Connected devices 305 associated with the event, such as for example, amusic server may have a playlist that is curated based on the overalltastes and preferences of the event attendees. A group chat may beautomatically created on the messaging application, so users may makeexplicit requests for music/pictures. When an user posts a picture tothe group chat, the picture gets forwarded to screen-based connecteddevice 305 that is displayed at the event. In particular embodiments,for the use case above, flow from event to curated attendees may beimplemented in group chat. Additionally, messaging application mayprovide a UI for notification and transfer to the new WiFi network,generating playlists on based on social-networking activity of the users(e.g., likes), streaming music (to be integrated with a music player),redirecting a group chat photo for display on a connected screen.

FIG. 6 illustrates an example method for accessing connected devices.The method 600 may start at step 610, where a computer server machinemay receiving a natural-language message. In particular embodiments, thenatural-language message includes an authorization request to authorizea first user access to one or more of a number of connected devicesassociated with a second user. At step 620, the computer server machineparses the natural-language message. In particular embodiments, at step625, the computer server machine may identify a number of n-grams of theparsed natural-language message. At step 630, the computer servermachine identifies, based on the parsed natural-language message, thefirst user and one or more connected devices. In particular embodiments,identifying the connected devices includes identifying an identifier ofthe connected devices based on the n-grams. At step 640, the computerserver machine, implicitly determines that the first user is authorizedto access the identified connected devices. In particular embodiments,the authorization is implicitly determined based on a calculatedstrength of a relationship between a node representing the first user ina social graph and a node representing the second user in the socialgraph satisfying a pre-determined threshold. At step 650, the computerserver machine provides, based on the implicit authorization, access tothe identified connected devices. In particular embodiments, the accessis provided for a pre-determined amount of time. In particularembodiments, at step 655, the computer server machine receives a commandmessage for the identified connected devices from a client deviceassociated with the first user. Particular embodiments may repeat one ormore steps of the method of FIG. 6, where appropriate. Although thisdisclosure describes and illustrates particular steps of the method ofFIG. 6 as occurring in a particular order, this disclosure contemplatesany suitable steps of the method of FIG. 6 occurring in any suitableorder. Moreover, although this disclosure describes and illustrates anexample method for providing access to connected devices, including theparticular steps of the method of FIG. 6, this disclosure contemplatesany suitable method for providing access to connected devices, includingany suitable steps, which may include all, some, or none of the steps ofthe method of FIG. 6, where appropriate. Furthermore, although thisdisclosure describes and illustrates particular components, devices, orsystems carrying out particular steps of the method of FIG. 6, thisdisclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 6.

FIG. 7 illustrates an example computer system 700. In particularembodiments, one or more computer systems 700 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 700 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 700 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 700.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems700. This disclosure contemplates computer system 700 taking anysuitable physical form. As example and not by way of limitation,computer system 700 may be an embedded computer system, a system-on-chip(SOC), a single-board computer system (SBC) (such as, for example, acomputer-on-module (COM) or system-on-module (SOM)), a desktop computersystem, a laptop or notebook computer system, an interactive kiosk, amainframe, a mesh of computer systems, a mobile telephone, a personaldigital assistant (PDA), a server, a tablet computer system, anaugmented/virtual reality device, or a combination of two or more ofthese. Where appropriate, computer system 700 may include one or morecomputer systems 700; be unitary or distributed; span multiplelocations; span multiple machines; span multiple data centers; or residein a cloud, which may include one or more cloud components in one ormore networks. Where appropriate, one or more computer systems 700 mayperform without substantial spatial or temporal limitation one or moresteps of one or more methods described or illustrated herein. As anexample and not by way of limitation, one or more computer systems 700may perform in real time or in batch mode one or more steps of one ormore methods described or illustrated herein. One or more computersystems 700 may perform at different times or at different locations oneor more steps of one or more methods described or illustrated herein,where appropriate.

In particular embodiments, computer system 700 includes a processor 702,memory 704, storage 706, an input/output (I/O) interface 708, acommunication interface 710, and a bus 712. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 702 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 702 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 704, or storage 706; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 704, or storage 706. In particular embodiments, processor702 may include one or more internal caches for data, instructions, oraddresses. This disclosure contemplates processor 702 including anysuitable number of any suitable internal caches, where appropriate. Asan example and not by way of limitation, processor 702 may include oneor more instruction caches, one or more data caches, and one or moretranslation lookaside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 704 or storage 706, andthe instruction caches may speed up retrieval of those instructions byprocessor 702. Data in the data caches may be copies of data in memory704 or storage 706 for instructions executing at processor 702 tooperate on; the results of previous instructions executed at processor702 for access by subsequent instructions executing at processor 702 orfor writing to memory 704 or storage 706; or other suitable data. Thedata caches may speed up read or write operations by processor 702. TheTLBs may speed up virtual-address translation for processor 702. Inparticular embodiments, processor 702 may include one or more internalregisters for data, instructions, or addresses. This disclosurecontemplates processor 702 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 702may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 702. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 704 includes main memory for storinginstructions for processor 702 to execute or data for processor 702 tooperate on. As an example and not by way of limitation, computer system700 may load instructions from storage 706 or another source (such as,for example, another computer system 700) to memory 704. Processor 702may then load the instructions from memory 704 to an internal registeror internal cache. To execute the instructions, processor 702 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 702 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor702 may then write one or more of those results to memory 704. Inparticular embodiments, processor 702 executes only instructions in oneor more internal registers or internal caches or in memory 704 (asopposed to storage 706 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 704 (as opposedto storage 706 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 702 tomemory 704. Bus 712 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 702 and memory 704 and facilitateaccesses to memory 704 requested by processor 702. In particularembodiments, memory 704 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 704 may include one ormore memories 704, where appropriate. Although this disclosure describesand illustrates particular memory, this disclosure contemplates anysuitable memory.

In particular embodiments, storage 706 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 706may include a hard disk drive (HDD), a floppy disk drive, flash memory,an optical disc, a magneto-optical disc, magnetic tape, or a UniversalSerial Bus (USB) drive or a combination of two or more of these. Storage706 may include removable or non-removable (or fixed) media, whereappropriate. Storage 706 may be internal or external to computer system700, where appropriate. In particular embodiments, storage 706 isnon-volatile, solid-state memory. In particular embodiments, storage 706includes read-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 706 taking any suitable physicalform. Storage 706 may include one or more storage control unitsfacilitating communication between processor 702 and storage 706, whereappropriate. Where appropriate, storage 706 may include one or morestorages 706. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 708 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 700 and one or more I/O devices. Computer system700 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 700. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 708 for them. Where appropriate, I/O interface 708 mayinclude one or more device or software drivers enabling processor 702 todrive one or more of these I/O devices. I/O interface 708 may includeone or more I/O interfaces 708, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 710 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 700 and one or more other computer systems 700 or one ormore networks. As an example and not by way of limitation, communicationinterface 710 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 710 for it. As an example and not by way of limitation,computer system 700 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 700 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 700 may include any suitable communication interface 710 for anyof these networks, where appropriate. Communication interface 710 mayinclude one or more communication interfaces 710, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 712 includes hardware, software, or bothcoupling components of computer system 700 to each other. As an exampleand not by way of limitation, bus 712 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 712may include one or more buses 712, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,feature, functions, operations, or steps, any of these embodiments mayinclude any combination or permutation of any of the components,elements, features, functions, operations, or steps described orillustrated anywhere herein that a person having ordinary skill in theart would comprehend. Furthermore, reference in the appended claims toan apparatus or system or a component of an apparatus or system beingadapted to, arranged to, capable of, configured to, enabled to, operableto, or operative to perform a particular function encompasses thatapparatus, system, component, whether or not it or that particularfunction is activated, turned on, or unlocked, as long as thatapparatus, system, or component is so adapted, arranged, capable,configured, enabled, operable, or operative. Additionally, although thisdisclosure describes or illustrates particular embodiments as providingparticular advantages, particular embodiments may provide none, some, orall of these advantages.

What is claimed is:
 1. A method comprising: by one or more computerserver machines, receiving, via a messaging application associated witha social-networking system, a command message for one or more connecteddevices of a user from a client device associated with the user; by theserver machines, parsing the command message; by the server machines,accessing a device graph to identify a plurality of connected devicesassociated with the user, wherein the device graph comprises: a firstnode representing the user, a plurality of second nodes representing theplurality of connected devices, and edges representing interactionsbetween the user and the plurality of connected devices; by the servermachines, determining, based on the parsed command message, an executioncontext for inferring the one or more connected devices of the user fromthe plurality of connected devices identified from the device graph thatthe user of the client device intents intends to send instructions tocorresponding to the command message, wherein the execution contextcomprises: an interaction history of the user with the one or moreconnected devices, and a current location of the user; by the servermachines, identifying, based on the interaction history of the user withthe one or more connected devices of the user and the current locationof the user, one or more of the plurality of connected devices forsending instructions to corresponding to the command message from theuser, wherein the plurality of connected devices of the user are locatedwithin a threshold proximity to the client device of the user; by theserver machines, determining, based on the parsed command message, oneor more instructions for the identified connected devices; and by theserver machines, sending the instructions to the identified connecteddevices.
 2. The method of claim 1, wherein the identifying the one ormore of the plurality of connected devices is further based at least inpart on determining the first node representing the user is within athreshold degree of separation of one or more of the second nodesrepresenting the respective one of the connected devices.
 3. The methodof claim 1, further comprising updating the device graph to add an edgeconnecting the first node representing the user with one or more secondnodes each representing the respective one of the identified connecteddevices.
 4. The method of claim 1, further comprising: parsing thecommand message to identify one or more n-grams; and identifying the oneor more of the plurality of connected devices based at least in part onone or more of the identified n-grams matching one or more of the secondnodes representing the respective one of the connected devices.
 5. Themethod of claim 1, wherein the identifying further comprises matchingone or more of the second nodes representing the respective one of theconnected devices to the first node representing the user by an edgecorresponding to a setting or action associated with the respective oneof the connected devices.
 6. The method of claim 1, wherein themessaging application associated with the social-networking system isexecuted on the client device.
 7. The method of claim 1, wherein thecommand message comprises a natural language message sent by themessaging application.
 8. The method of claim 1, the command messagecomprises a voice-transcribed message sent by the messaging application.9. The method of claim 1, further comprising determining, based on theparsed command message and for each of the identified connected devices,a respective set of instructions for the connected device.
 10. Themethod of claim 1, wherein the execution context further comprises: alevel of authorization for the user; or permissions or privacy settingsconfigured for one or more of the identified connected devices.
 11. Themethod of claim 1, further comprising: receiving a device message fromone or more of the connected devices; generating a natural-languagemessage based on the device message; identifying one or more clientdevices, wherein each of the identified client devices is associatedwith the user; and sending the natural-language message to theidentified client devices.
 12. The method of claim 11, wherein thenatural-language message comprises: a status message relating to one ormore of the connected devices; a request for additional information toclarify a command message; a request to authenticate the user; a messageacknowledging the command message or confirming completion of theinstructions; a message stating that the instructions cannot beexecuted; or an alert regarding one or more of the connected devices.13. The method of claim 1, wherein the identified one or more of theplurality of connected devices are associated with the current locationof the user.
 14. One or more computer-readable non-transitory storagemedia embodying software configured when executed to: receive, via amessaging application associated with a social-networking system, acommand message for one or more connected devices of a user from aclient device associated with the user; parse the command message;access a device graph to identify a plurality of connected devicesassociated with the user, wherein the device graph comprises: a firstnode representing the user, a plurality of second nodes representing theplurality of connected devices, and edges representing interactionsbetween the user and the plurality of connected devices; determine,based on the parsed command message, an execution context for inferringthe one or more connected devices of the user from the plurality ofconnected devices identified from the device graph that the user of theclient device intends to send instructions to corresponding to thecommand message, wherein the execution context comprises: an interactionhistory of the user with the one or more connected devices, and acurrent location of the user; identify, based on the interaction historyof the user with the one or more connected devices of the user and thecurrent location of the user, one or more of the plurality of connecteddevices for sending instructions to corresponding to the command messagefrom the user, wherein the plurality of connected devices of the userare located within a threshold proximity to the client device of theuser; determine, based on the parsed command message, one or moreinstructions for the identified connected devices; and send theinstructions to the identified connected devices.
 15. The media of claim14, wherein the software is further configured to: identify the one ormore of the plurality of connected devices based at least in part ondetermining the first node representing the user is within a thresholddegree of separation of one or more of the second nodes representing therespective one of the connected devices.
 16. The media of claim 14,wherein the software is further configured to update the device graph toadd an edge connecting the first node representing the user with one ormore second nodes each representing the respective one of the identifiedconnected devices.
 17. The media of claim 14, wherein the software isfurther configured to: parse the command to identify one or moren-grams; and identify the one or more of the plurality of connecteddevices based at least in part on one or more of the identified n-gramsmatching one or more of the second nodes representing the respective oneof the connected devices.
 18. A device comprising: one or moreprocessors; and one or more computer-readable non-transitory storagemedia coupled to the processors and embodying software configured whenexecuted to: receive, via a messaging application associated with asocial-networking system, a command message for one or more connecteddevices of a user from a client device associated with the user; parsethe command message; access a device graph to identify a plurality ofconnected devices associated with the user, wherein the device graphcomprises: a first node representing the user, a plurality of secondnodes representing the plurality of connected devices, and edgesrepresenting interactions between the user and the plurality ofconnected devices; determine, based on the parsed command message, anexecution context for inferring the one or more connected devices of theuser from the plurality of connected devices identified from the devicegraph that the user of the client device intends to send instructions tocorresponding to the command message, wherein the execution contextcomprises: an interaction history of the user with the one or moreconnected devices, and a current location of the user; identify, basedon the interaction history of the user with the one or more connecteddevices of the user and the current location of the user, one or more ofthe plurality of connected devices for sending instructions tocorresponding to the command message from the user, wherein theplurality of connected devices of the user are located within athreshold proximity to the client device of the user; determine, basedon the parsed command message, one or more instructions for theidentified connected devices; and send the instructions to theidentified connected devices.
 19. The device of claim 18, wherein thesoftware is further configured to: identify the one or more of theplurality of connected devices based at least in part on determining thefirst node representing the user is within a threshold degree ofseparation of one or more of the second nodes representing therespective one of the connected devices.
 20. The device of claim 18,wherein the software is further configured to update the device graph toadd an edge connecting the first node representing the user with one ormore second nodes each representing the respective one of the identifiedconnected devices.